Geek Sublime: The Beauty of Code, the Code of Beauty by Chandra Vikram
Author:Chandra, Vikram [Chandra, Vikram]
Language: eng
Format: mobi, epub
ISBN: 9781555973261
Publisher: Graywolf Press
Published: 2014-09-01T16:00:00+00:00
Programmers work doggedly toward correctness, but the sheer size and complexity of software ensures that bugs lurk within. A bug is, of course, a flaw or fault in a program that produces unexpected results. In 1986, the award-winning researcher and academic Jon Bentley published a book that is now widely regarded as a classic, Programming Pearls. One of the algorithms he implemented was for binary search, a method of finding a value in a sorted array, which was first published in 1946. In 2006, decades after the publication of Bentley’s book—by which time his particular implementation had been copied and used many thousands of times—one of his erstwhile students, Joshua Bloch, discovered that under certain conditions this technique could manifest a bug.16 Bloch published his finding under a justly panic-raising headline, “Extra, Extra—Read All About It: Nearly All Binary Searches and Mergesorts are Broken.” He wrote:
The general lesson that I take away from this bug is humility: It is hard to write even the smallest piece of code correctly, and our whole world runs on big, complex pieces of code.
Careful design is great. Testing is great. Formal methods are great. Code reviews are great. Static analysis is great. But none of these things alone are sufficient to eliminate bugs: They will always be with us. A bug can exist for half a century despite our best efforts to exterminate it.17
That software algorithms are now running our whole world means that software faults or errors can send us down the wrong highway, injure or kill people, and cause disasters. Every programmer is familiar with the most infamous bugs: the French Ariane 5 rocket that went off course and self-destructed forty seconds after lift-off because of an error in converting between representations of number values; the Therac-25 radiation therapy machine that reacted to a combination of operator input and a “counter overflow” by delivering doses of radiation a hundred times more intense than required, resulting in the agonizing deaths of five people and injuries to many others; the “Flash Crash” of 2010, when the Dow Jones suddenly plunged a thousand points and recovered just as suddenly, apparently as a result of automatic trading programs reacting to a single large trade.
These are the notorious bugs, but there are bugs in every piece of software that you use today. A professional “cyber warrior,” whose job it is to find and exploit bugs for the US government, recently estimated that “most of the software written in the world has a bug every three to five lines of code.”18 These bugs may not kill you, but they cause your system to freeze, they corrupt your data, and they expose your computers to hackers. The next great hope for more stable, bug-free software is functional programming, which is actually the oldest paradigm in computing—it uses the algebraic techniques of function evaluation used by the creators of the first computers. In functional programming, all computation is expressed as the evaluation of expressions; the radical simplicity of thinking about
Download
Geek Sublime: The Beauty of Code, the Code of Beauty by Chandra Vikram.epub
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Actors & Entertainers | Artists, Architects & Photographers |
Authors | Composers & Musicians |
Dancers | Movie Directors |
Television Performers | Theatre |
Cecilia; Or, Memoirs of an Heiress — Volume 3 by Fanny Burney(31458)
Cecilia; Or, Memoirs of an Heiress — Volume 2 by Fanny Burney(31409)
Fanny Burney by Claire Harman(26244)
We're Going to Need More Wine by Gabrielle Union(18633)
Plagued by Fire by Paul Hendrickson(17111)
Cat's cradle by Kurt Vonnegut(14760)
All the Missing Girls by Megan Miranda(14743)
Bombshells: Glamour Girls of a Lifetime by Sullivan Steve(13686)
Leonardo da Vinci by Walter Isaacson(12804)
4 3 2 1: A Novel by Paul Auster(11793)
For the Love of Europe by Rick Steves(11493)
Adultolescence by Gabbie Hanna(8590)
The remains of the day by Kazuo Ishiguro(8396)
Note to Self by Connor Franta(7452)
Diary of a Player by Brad Paisley(7268)
Giovanni's Room by James Baldwin(6811)
What Does This Button Do? by Bruce Dickinson(5932)
Born a Crime by Trevor Noah(5095)
Ego Is the Enemy by Ryan Holiday(4959)
